package com.supreme.studyserver.proxy;

import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

public class SupremoProxy implements MethodInterceptor {

    private final Object target;

    public SupremoProxy(Object target) {
        this.target = target;
    }

    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        final Object invokeResult = method.invoke(target, objects);
        return invokeResult;
    }
}
